Integrand size = 45, antiderivative size = 231 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x) (c i+d i x)^2} \, dx=\frac {2 A B d n (a+b x)}{(b c-a d)^2 g i^2 (c+d x)}-\frac {2 B^2 d n^2 (a+b x)}{(b c-a d)^2 g i^2 (c+d x)}+\frac {2 B^2 d n (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(b c-a d)^2 g i^2 (c+d x)}-\frac {d (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(b c-a d)^2 g i^2 (c+d x)}+\frac {b \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^3}{3 B (b c-a d)^2 g i^2 n} \]
[Out]
Time = 0.17 (sec) , antiderivative size = 231, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2561, 2388, 2339, 30, 2333, 2332} \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x) (c i+d i x)^2} \, dx=\frac {b \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^3}{3 B g i^2 n (b c-a d)^2}-\frac {d (a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{g i^2 (c+d x) (b c-a d)^2}+\frac {2 A B d n (a+b x)}{g i^2 (c+d x) (b c-a d)^2}+\frac {2 B^2 d n (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{g i^2 (c+d x) (b c-a d)^2}-\frac {2 B^2 d n^2 (a+b x)}{g i^2 (c+d x) (b c-a d)^2} \]
[In]
[Out]
Rule 30
Rule 2332
Rule 2333
Rule 2339
Rule 2388
Rule 2561
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {(b-d x) \left (A+B \log \left (e x^n\right )\right )^2}{x} \, dx,x,\frac {a+b x}{c+d x}\right )}{(b c-a d)^2 g i^2} \\ & = \frac {b \text {Subst}\left (\int \frac {\left (A+B \log \left (e x^n\right )\right )^2}{x} \, dx,x,\frac {a+b x}{c+d x}\right )}{(b c-a d)^2 g i^2}-\frac {d \text {Subst}\left (\int \left (A+B \log \left (e x^n\right )\right )^2 \, dx,x,\frac {a+b x}{c+d x}\right )}{(b c-a d)^2 g i^2} \\ & = -\frac {d (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(b c-a d)^2 g i^2 (c+d x)}+\frac {b \text {Subst}\left (\int x^2 \, dx,x,A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{B (b c-a d)^2 g i^2 n}+\frac {(2 B d n) \text {Subst}\left (\int \left (A+B \log \left (e x^n\right )\right ) \, dx,x,\frac {a+b x}{c+d x}\right )}{(b c-a d)^2 g i^2} \\ & = \frac {2 A B d n (a+b x)}{(b c-a d)^2 g i^2 (c+d x)}-\frac {d (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(b c-a d)^2 g i^2 (c+d x)}+\frac {b \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^3}{3 B (b c-a d)^2 g i^2 n}+\frac {\left (2 B^2 d n\right ) \text {Subst}\left (\int \log \left (e x^n\right ) \, dx,x,\frac {a+b x}{c+d x}\right )}{(b c-a d)^2 g i^2} \\ & = \frac {2 A B d n (a+b x)}{(b c-a d)^2 g i^2 (c+d x)}-\frac {2 B^2 d n^2 (a+b x)}{(b c-a d)^2 g i^2 (c+d x)}+\frac {2 B^2 d n (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(b c-a d)^2 g i^2 (c+d x)}-\frac {d (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(b c-a d)^2 g i^2 (c+d x)}+\frac {b \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^3}{3 B (b c-a d)^2 g i^2 n} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(789\) vs. \(2(231)=462\).
Time = 0.40 (sec) , antiderivative size = 789, normalized size of antiderivative = 3.42 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x) (c i+d i x)^2} \, dx=\frac {b B^2 n^2 \log ^3\left (\frac {a+b x}{c+d x}\right )}{3 (b c-a d)^2 g i^2}-\frac {2 B n \log \left (\frac {a+b x}{c+d x}\right ) \left (-A+B n-B \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )\right )}{(b c-a d) g i^2 (c+d x)}+\frac {\log ^2\left (\frac {a+b x}{c+d x}\right ) \left (A b B c n-a B^2 d n^2+A b B d n x-b B^2 d n^2 x+b B^2 c n \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )+b B^2 d n x \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )\right )}{(b c-a d)^2 g i^2 (c+d x)}+\frac {A^2-2 A B n+2 B^2 n^2+2 A B \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )-2 B^2 n \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )+B^2 \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )^2}{(b c-a d) g i^2 (c+d x)}+\frac {b \log (a+b x) \left (A^2-2 A B n+2 B^2 n^2+2 A B \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )-2 B^2 n \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )+B^2 \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )^2\right )}{(b c-a d)^2 g i^2}-\frac {b \left (A^2-2 A B n+2 B^2 n^2+2 A B \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )-2 B^2 n \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )+B^2 \left (\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-n \log \left (\frac {a+b x}{c+d x}\right )\right )^2\right ) \log (c+d x)}{(b c-a d)^2 g i^2} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(508\) vs. \(2(229)=458\).
Time = 5.06 (sec) , antiderivative size = 509, normalized size of antiderivative = 2.20
method | result | size |
parallelrisch | \(\frac {-6 B^{2} a \,b^{2} d^{4} n^{3}+6 B^{2} b^{3} c \,d^{3} n^{3}-3 A^{2} a \,b^{2} d^{4} n +3 A^{2} b^{3} c \,d^{3} n +B^{2} x \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{3} b^{3} d^{4}+B^{2} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{3} b^{3} c \,d^{3}+3 A^{2} x \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{3} d^{4}+3 A^{2} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{3} c \,d^{3}-6 A B x \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{3} d^{4} n -6 A B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) a \,b^{2} d^{4} n +6 A B a \,b^{2} d^{4} n^{2}-6 A B \,b^{3} c \,d^{3} n^{2}-3 B^{2} x \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{2} b^{3} d^{4} n +6 B^{2} x \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{3} d^{4} n^{2}+3 A B x \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{2} b^{3} d^{4}-3 B^{2} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{2} a \,b^{2} d^{4} n +6 B^{2} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) a \,b^{2} d^{4} n^{2}+3 A B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{2} b^{3} c \,d^{3}}{3 i^{2} g \left (d x +c \right ) \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) b^{2} d^{3} n}\) | \(509\) |
[In]
[Out]
none
Time = 0.36 (sec) , antiderivative size = 432, normalized size of antiderivative = 1.87 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x) (c i+d i x)^2} \, dx=\frac {3 \, A^{2} b c - 3 \, A^{2} a d + {\left (B^{2} b d n^{2} x + B^{2} b c n^{2}\right )} \log \left (\frac {b x + a}{d x + c}\right )^{3} + 6 \, {\left (B^{2} b c - B^{2} a d\right )} n^{2} + 3 \, {\left (B^{2} b c - B^{2} a d + {\left (B^{2} b d x + B^{2} b c\right )} \log \left (\frac {b x + a}{d x + c}\right )\right )} \log \left (e\right )^{2} - 3 \, {\left (B^{2} a d n^{2} - A B b c n + {\left (B^{2} b d n^{2} - A B b d n\right )} x\right )} \log \left (\frac {b x + a}{d x + c}\right )^{2} - 6 \, {\left (A B b c - A B a d\right )} n + 3 \, {\left (2 \, A B b c - 2 \, A B a d + {\left (B^{2} b d n x + B^{2} b c n\right )} \log \left (\frac {b x + a}{d x + c}\right )^{2} - 2 \, {\left (B^{2} b c - B^{2} a d\right )} n - 2 \, {\left (B^{2} a d n - A B b c + {\left (B^{2} b d n - A B b d\right )} x\right )} \log \left (\frac {b x + a}{d x + c}\right )\right )} \log \left (e\right ) + 3 \, {\left (2 \, B^{2} a d n^{2} - 2 \, A B a d n + A^{2} b c + {\left (2 \, B^{2} b d n^{2} - 2 \, A B b d n + A^{2} b d\right )} x\right )} \log \left (\frac {b x + a}{d x + c}\right )}{3 \, {\left ({\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} g i^{2} x + {\left (b^{2} c^{3} - 2 \, a b c^{2} d + a^{2} c d^{2}\right )} g i^{2}\right )}} \]
[In]
[Out]
Timed out. \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x) (c i+d i x)^2} \, dx=\text {Timed out} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 1014 vs. \(2 (229) = 458\).
Time = 0.26 (sec) , antiderivative size = 1014, normalized size of antiderivative = 4.39 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x) (c i+d i x)^2} \, dx=B^{2} {\left (\frac {1}{{\left (b c d - a d^{2}\right )} g i^{2} x + {\left (b c^{2} - a c d\right )} g i^{2}} + \frac {b \log \left (b x + a\right )}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} g i^{2}} - \frac {b \log \left (d x + c\right )}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} g i^{2}}\right )} \log \left (e {\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n}\right )^{2} + 2 \, A B {\left (\frac {1}{{\left (b c d - a d^{2}\right )} g i^{2} x + {\left (b c^{2} - a c d\right )} g i^{2}} + \frac {b \log \left (b x + a\right )}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} g i^{2}} - \frac {b \log \left (d x + c\right )}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} g i^{2}}\right )} \log \left (e {\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n}\right ) + \frac {1}{3} \, {\left (\frac {{\left ({\left (b d x + b c\right )} \log \left (b x + a\right )^{3} - {\left (b d x + b c\right )} \log \left (d x + c\right )^{3} + 3 \, {\left (b d x + b c\right )} \log \left (b x + a\right )^{2} + 3 \, {\left (b d x + b c + {\left (b d x + b c\right )} \log \left (b x + a\right )\right )} \log \left (d x + c\right )^{2} + 6 \, b c - 6 \, a d + 6 \, {\left (b d x + b c\right )} \log \left (b x + a\right ) - 3 \, {\left (2 \, b d x + {\left (b d x + b c\right )} \log \left (b x + a\right )^{2} + 2 \, b c + 2 \, {\left (b d x + b c\right )} \log \left (b x + a\right )\right )} \log \left (d x + c\right )\right )} n^{2}}{b^{2} c^{3} g i^{2} - 2 \, a b c^{2} d g i^{2} + a^{2} c d^{2} g i^{2} + {\left (b^{2} c^{2} d g i^{2} - 2 \, a b c d^{2} g i^{2} + a^{2} d^{3} g i^{2}\right )} x} - \frac {3 \, {\left ({\left (b d x + b c\right )} \log \left (b x + a\right )^{2} + {\left (b d x + b c\right )} \log \left (d x + c\right )^{2} + 2 \, b c - 2 \, a d + 2 \, {\left (b d x + b c\right )} \log \left (b x + a\right ) - 2 \, {\left (b d x + b c + {\left (b d x + b c\right )} \log \left (b x + a\right )\right )} \log \left (d x + c\right )\right )} n \log \left (e {\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n}\right )}{b^{2} c^{3} g i^{2} - 2 \, a b c^{2} d g i^{2} + a^{2} c d^{2} g i^{2} + {\left (b^{2} c^{2} d g i^{2} - 2 \, a b c d^{2} g i^{2} + a^{2} d^{3} g i^{2}\right )} x}\right )} B^{2} - \frac {{\left ({\left (b d x + b c\right )} \log \left (b x + a\right )^{2} + {\left (b d x + b c\right )} \log \left (d x + c\right )^{2} + 2 \, b c - 2 \, a d + 2 \, {\left (b d x + b c\right )} \log \left (b x + a\right ) - 2 \, {\left (b d x + b c + {\left (b d x + b c\right )} \log \left (b x + a\right )\right )} \log \left (d x + c\right )\right )} A B n}{b^{2} c^{3} g i^{2} - 2 \, a b c^{2} d g i^{2} + a^{2} c d^{2} g i^{2} + {\left (b^{2} c^{2} d g i^{2} - 2 \, a b c d^{2} g i^{2} + a^{2} d^{3} g i^{2}\right )} x} + A^{2} {\left (\frac {1}{{\left (b c d - a d^{2}\right )} g i^{2} x + {\left (b c^{2} - a c d\right )} g i^{2}} + \frac {b \log \left (b x + a\right )}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} g i^{2}} - \frac {b \log \left (d x + c\right )}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} g i^{2}}\right )} \]
[In]
[Out]
none
Time = 0.90 (sec) , antiderivative size = 368, normalized size of antiderivative = 1.59 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x) (c i+d i x)^2} \, dx=\frac {1}{3} \, {\left (\frac {B^{2} b n^{2} \log \left (\frac {b x + a}{d x + c}\right )^{3}}{b c g i^{2} - a d g i^{2}} - 3 \, {\left (\frac {{\left (b x + a\right )} B^{2} d n^{2}}{{\left (b c g i^{2} - a d g i^{2}\right )} {\left (d x + c\right )}} - \frac {B^{2} b n \log \left (e\right ) + A B b n}{b c g i^{2} - a d g i^{2}}\right )} \log \left (\frac {b x + a}{d x + c}\right )^{2} + \frac {3 \, {\left (B^{2} b \log \left (e\right )^{2} + 2 \, A B b \log \left (e\right ) + A^{2} b\right )} \log \left (\frac {b x + a}{d x + c}\right )}{b c g i^{2} - a d g i^{2}} + \frac {6 \, {\left (B^{2} d n^{2} - B^{2} d n \log \left (e\right ) - A B d n\right )} {\left (b x + a\right )} \log \left (\frac {b x + a}{d x + c}\right )}{{\left (b c g i^{2} - a d g i^{2}\right )} {\left (d x + c\right )}} - \frac {3 \, {\left (2 \, B^{2} d n^{2} - 2 \, B^{2} d n \log \left (e\right ) + B^{2} d \log \left (e\right )^{2} - 2 \, A B d n + 2 \, A B d \log \left (e\right ) + A^{2} d\right )} {\left (b x + a\right )}}{{\left (b c g i^{2} - a d g i^{2}\right )} {\left (d x + c\right )}}\right )} {\left (\frac {b c}{{\left (b c - a d\right )}^{2}} - \frac {a d}{{\left (b c - a d\right )}^{2}}\right )} \]
[In]
[Out]
Time = 1.96 (sec) , antiderivative size = 365, normalized size of antiderivative = 1.58 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a g+b g x) (c i+d i x)^2} \, dx=\frac {B^2\,b\,{\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}^3}{3\,g\,i^2\,n\,{\left (a\,d-b\,c\right )}^2}-\frac {A^2-2\,A\,B\,n+2\,B^2\,n^2}{\left (a\,d-b\,c\right )\,\left (c\,g\,i^2+d\,g\,i^2\,x\right )}-\frac {2\,B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\,\left (A-B\,n\right )}{\left (a\,d-b\,c\right )\,\left (c\,g\,i^2+d\,g\,i^2\,x\right )}-{\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}^2\,\left (\frac {B^2}{\left (a\,d-b\,c\right )\,\left (c\,g\,i^2+d\,g\,i^2\,x\right )}-\frac {B\,b\,\left (A-B\,n\right )}{g\,i^2\,n\,{\left (a\,d-b\,c\right )}^2}\right )-\frac {b\,\mathrm {atan}\left (\frac {b\,\left (2\,b\,d\,x+\frac {a^2\,d^2\,g\,i^2-b^2\,c^2\,g\,i^2}{g\,i^2\,\left (a\,d-b\,c\right )}\right )\,\left (A^2-2\,A\,B\,n+2\,B^2\,n^2\right )\,1{}\mathrm {i}}{\left (a\,d-b\,c\right )\,\left (b\,A^2-2\,b\,A\,B\,n+2\,b\,B^2\,n^2\right )}\right )\,\left (A^2-2\,A\,B\,n+2\,B^2\,n^2\right )\,2{}\mathrm {i}}{g\,i^2\,{\left (a\,d-b\,c\right )}^2} \]
[In]
[Out]